////////////////////////////////////////////////////////////
// Workfile : Door.h
// Author : Andreas Lehner
// Date : 29.10.2012
// Description : class Door holds information about a door
// it is able to print a door and set it opened or closed
// it can have a neighbour room, which it connects
// can be cloned for room copies	INTERFACE
// Remarks : 0
// Revision : 1
////////////////////////////////////////////////////////////
#include "Side.h"
#include "Object.h"

class Door : public Side {
public:
	//constructors
	Door() : mOpened(false), mNeighbour(0) {};
	Door(size_t length) : Side(length), mNeighbour(0), mOpened(false) {};
	//print function
	void Print(size_t pos) const;
	//set and get known if this side has a neighbour
	void setNeighbour(Room* neighbour);
	bool hasNeighbour() const;
	//set and get known if door is opened or closed
	void setOpened(bool opened);
	bool isOpenend() const;
	//clone a side for copying a room
	Side * clone() const;
private:
	Room * mNeighbour;
	bool mOpened;
};